package com.tanhua.server.controller;

import com.tanhua.model.vo.HuanXinUserVo;
import com.tanhua.server.service.HuanXinService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/huanxin")
public class HuanXinController {
    @Autowired
    private HuanXinService huanXinService;
    /**
     *注意：APP用户连接环信时需要调用此接口，查询用户环信账户
     * 查询当前用户的环信账号 用于连接环信平台发消息使用
     * @return
     */
    @GetMapping("/user")
    public ResponseEntity user(){
        HuanXinUserVo vo = huanXinService.findHuanxinUser();
        return ResponseEntity.ok(vo);
    }
}
